// 引入manifest.json文件
import manifestJson from '@/manifest.json';
const applet_info_arr = [{
	wx_name: '千标',
	appid: 'wx584975adc1436500',
	wx_sign_key: "fd8892f8b7696caee3f26e84c09cd080",
	api_domain: 'https://www.hbqianbiao.com/',
	api_domain2: 'https://www.hbqianbiao.com/',
	is_force_login: 0, //是否强制登录
	setUpSharing: 0, //是否设置分享
	type: 'mp-weixin', //平台名称
}, ];
let mpWeixinConfig = '';
// console.log('process.env.UNI_PLATFORM', process.env.UNI_PLATFORM);  
if (process.env.UNI_PLATFORM === 'mp-weixin') {
	console.log('当前是微信小程序');
	mpWeixinConfig = manifestJson["mp-weixin"].appid;

} else if (process.env.UNI_PLATFORM === 'mp-baidu') {
	mpWeixinConfig = manifestJson["mp-baidu"].appid;
	console.log('当前是百度小程序');

} else if (process.env.UNI_PLATFORM === 'mp-toutiao') {
	mpWeixinConfig = manifestJson["mp-toutiao"].appid;
	console.log('当前是头条小程序');

} else if (process.env.UNI_PLATFORM === 'mp-360') {
	mpWeixinConfig = manifestJson["mp-360"].appid;
	console.log('当前是360小程序');

} else {
	mpWeixinConfig = manifestJson["mp-360"].appid;
	console.log('当前是其他平台');
}
// const setTimestamp = Math.floor(Date.parse("2025-01-01 08:00:00") / 1000); //抖音小程序设置时间戳 
const currentTimeStamp = Math.floor(Date.now() / 1000); //获取当前时间戳
// mpWeixinConfig = manifestJson["mp-weixin"].appid;
console.log(mpWeixinConfig)
const applet_info = applet_info_arr.filter(item => mpWeixinConfig.includes(item.appid)); //.map(item => item.api_domain)
const new_applet_info = {};
for (var key in applet_info[0]) {
	new_applet_info[key] = applet_info[0][key];
	// new_applet_info['setTimestamp'] = setTimestamp;
	new_applet_info['currentTimeStamp'] = currentTimeStamp;
}
// console.log("manifestJson",manifestJson);
// console.log("applet_info", applet_info[0].api_domain);    
const domain = new_applet_info.api_domain;
const domain2 = new_applet_info.api_domain2;
const web_name = "千标";
const web_desc = "千标；汇标网；商标转让；专利转让；商标查询";
const sign_key = new_applet_info.wx_sign_key;
export default {
	applet_info_arr,
	applet_info,
	new_applet_info,
	domain,
	domain2,
	web_name,
	web_desc,
	sign_key
}
// // 接口域名 小程序基本信息
// const domain="https://huibiaow.cn/";
// // const domain="https://www-dev.huibiaow.cn/";//测试接口  
// const web_name="标头狮";
// const web_desc="标头狮；汇标网；商标转让；专利转让；商标查询";
// const sign_key="f3b726857f523cb48594ffa4f99ef978";
// export default {
//        domain,
// 	   web_name,
// 	   web_desc,
// 	   sign_key
// }